<template>
  <div>
    {{ t("message.home") }}
    <button
      @click="() => router.push({ path: '/home/mine', query: { id: 1 } })"
    >
      去个人中心
    </button>
    <a-button type="primary">测试 Ui引入情况</a-button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { getCurrentInstance } from 'vue'
import { useI18n } from 'vue-i18n'
import { getTest } from '@/api/home'
// import { ITest } from '@/types/homeTypes'
// 声明上下文
const { proxy }: any = getCurrentInstance()
// 实例化i18n实现国际化
const { t } = useI18n()

const router = useRouter()
// const route = useRoute()
// console.log(route.params)

proxy.$message.info('这是消息弹窗')

// const data = {
//   name: '张三',
//   id: 1
// }

getTest<string>({}).then((res) => {
  console.log(res)
})

// postTest<ITest>(data).then((res) => {
//   console.log(res.data)
// })

// postJson<ITest>(data).then((res) => {
//   console.log(res.data)
// })
</script>

<style scoped>
</style>
